//package com.winit.common.support.config;
//
//import org.springframework.amqp.core.Binding;
//import org.springframework.amqp.core.BindingBuilder;
//import org.springframework.amqp.core.FanoutExchange;
//import org.springframework.amqp.core.Queue;
//import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
//import org.springframework.amqp.support.converter.MessageConverter;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class RabbitConfig {
//
//    @Bean
//    public MessageConverter jsonMessageConverter() {
//        return new Jackson2JsonMessageConverter();
//    }
//
//    @Value("${ucloud_exchange}")
//    private String ucloud_exchange;
//
//    @Bean
//    FanoutExchange ucloudExchange() {
//        return new FanoutExchange(ucloud_exchange);
//    }
//
//    @Bean
//    public Queue ucloudConfigQueue() {
//        return new Queue("ucloud-config-queue");
//    }
//
//    @Bean
//    public Queue ucloudAppQueue() {
//        return new Queue("ucloud-app-queue");
//    }
//
//    @Bean
//    public Queue ucloudInitQueue() {
//        return new Queue("ucloud-init-queue");
//    }
//
//    @Bean
//    Binding bindingExchangeUConfigQ(Queue ucloudConfigQueue, FanoutExchange ucloudExchange) {
//        return BindingBuilder.bind(ucloudConfigQueue).to(ucloudExchange);
//    }
//
//    @Bean
//    Binding bindingExchangeUAppQ(Queue ucloudAppQueue, FanoutExchange ucloudExchange) {
//        return BindingBuilder.bind(ucloudAppQueue).to(ucloudExchange);
//    }
//
//    @Bean
//    Binding bindingExchangeUInitQ(Queue ucloudInitQueue, FanoutExchange ucloudExchange) {
//        return BindingBuilder.bind(ucloudInitQueue).to(ucloudExchange);
//    }
//}
